import config from 'config'
import httpFetch from 'share/httpFetch'
import errorMessage from 'share/errorMessage'

export default {
  //获取矩阵列表
  getWorkflowMatrixList(params) {
    // return httpFetch.get(`/api/approvals/matrix/list`);
    return httpFetch.get(`/api/approvals/matrix/list`,params)
  },
  //保存矩阵明细
  postWorkflowMatrix(params){
    return httpFetch.post('/api/approvals/matrix', params)
  },
  //矩阵明细详情
  getWorkflowMatrix(id){
    return httpFetch.get(`/api/approvals/matrix/${id}`)
  },
  getDimensionList(params){
    return httpFetch.get(`/api/approvals/matrix/dimension/rla/list`,params)
  },
  postDimensionStatus(params){
    return httpFetch.post(`/api/approvals/matrix/dimension/rla/used`,params)
  },
  postMatrixDetailList(params){
    return httpFetch.post(`/api/approvals/matrix/rule/list?page=${params.page}&size=${params.size}`, params)
  },
  //新建编辑矩阵明细
  postMatrixDetailCondition(params){
    return httpFetch.post('/api/approvals/matrix/rule', params)
  },
  //编辑条件纬度
  postEditConditionDimension(params){
    return httpFetch.post('/api/approvals/matrix/dimension/rla', params)
  },
  //删除矩阵明细
  deleteConditionDimension(params){
    return httpFetch.delete('/api/approvals/matrix/rule', params)
  }
}